package com.jiazhong.shuzu;

public class Demo08 {
    public static void main(String[] args) {
        int a[]={34,43,13,21,23,25,45,63,6};
        int index=0,temp;
        for (int i=0;i<a.length-1;i++){//轮
            for (int j=0;j<a.length-1;j++){//次
                if (a[index]<a[j+1]){
                    index=j+1;
                }
            }
            temp=a[i];
            a[i]=a[index];
            a[index]=temp;
            System.out.println("第"+(i+1)+"轮");
            for (int k=0;k<a.length;k++){
                System.out.print(" "+a[k]);
            }
            System.out.println();
        }
    }
}
